﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LRS.DAL;
namespace LRS.BLL
{
    public static class bSalesOrder
    {
        public static string InsertOrder(eSalesOrder order)
        {
            return dSalesOrder.InsertOrder(order);
        }
        public static eSalesOrder GetOrderByID(int OrderID)
        {
            return dSalesOrder.GetOrderByID(OrderID);
        }
        public static List<eSalesOrder> GetOrders()
        {
            return dSalesOrder.GetOrders();
        }
        public static List<eSalesOrder> GetOrdersByNumber(string OrderNumber)
        {
            return dSalesOrder.GetOrders().Where(c => c.SalesOrderNumber == OrderNumber).ToList();
        }
        public static eSalesOrder GetOrderByNumber(string OrderNumber)
        {
            return dSalesOrder.GetOrderByNumber(OrderNumber);
        }
        public static void UpdateOrder(eSalesOrder order)
        {
            dSalesOrder.UpdateOrder(order);
        }
        public static List<eSalesOrder> GetOrdersByKeyword(string keyword)
        {
            return dSalesOrder.GetOrdersByKeyword(keyword);
        }
        public static List<eSalesOrder> GetOrdersOnHold()
        {
            return dSalesOrder.GetOrders().Where(c => c.OnHold == true).ToList();
        }
        public static void DeleteOrder(int OrderID)
        {
            dSalesOrder.DeleteOrder(OrderID);
        }
    }
}
